.workspace-drawer,
.modal,
.prompt,
.suggestion-container {
  box-shadow: 0px 20px 30px rgb(0 0 0 / 20%);
}

.prompt {
  border: 1px solid var(--shade-plus-darker);
}

.modal {
  @include radius-l;

  overflow: hidden;
  font-size: var(--ui-font-size);
  border: 1px solid var(--shade-30);
  background: var(--background-primary);
  min-width: 400px;
  max-width: 1000px;
  max-height: 90vh;
  padding: 0;

  .modal-container.mod-confirmation & {
    width: auto;
  }

  > :last-child {
    padding-bottom: 10px;
  }

  &.mod-sync-history {
    background-color: var(--shade-0);
  }

  .is-mobile & {
    border: none;
  }

  &.mod-settings {
    max-width: 1000px;
    width: 90vw;
    height: 90vh;

    .vertical-tabs-container,
    .vertical-tab-content-container,
    .vertical-tab-header {
      height: 90vh;
    }

    .vertical-tab-header {
      @include vertical-scroll-shadow(var(--shade-3-opaque), 0.15, 1px);

      .theme-dark & {
        @include vertical-scroll-shadow(var(--shade-3-opaque), 0.5, 1px);
      }

      .is-mobile & {
        background: none !important;
      }

      margin-top: 27px;
      padding-top: 0;
    }

    .vertical-tab-content-container {
      padding: 0;
      border-left: 1px solid var(--background-modifier-border);
    }
  }

  &.mod-community-theme,
  &.mod-community-plugin {
    width: 90vw;
  }

  &.mod-sync-history {
    width: 90vw;

    .modal-content {
      flex-direction: row;
      align-items: stretch;
      padding: 0;
      height: 90vh;
    }

    .sync-history-list {
      background-color: var(--background-secondary);
      flex-grow: 0;
      width: 300px;
      padding: 1.5rem 0 0;
    }

    .search-input-container {
      width: 100%;
      input {
        width: 100%;
      }
    }

    .sync-history-content-container {
      border-left: 1px solid var(--background-modifier-border);
      background-color: var(--background-primary);
      padding: 1.5rem;
      height: 100%;
    }

    .sync-history-list-item {
      line-height: 1.3;
      &.is-active,
      &:hover {
        background-color: var(--shade-plus-darker);
      }
    }

    .sync-history-content-buttons {
      margin: 1rem 0 0;
    }

    .setting-item {
      padding: 0;
    }
  }
}

.modal-close-button {
  background-color: var(--shade-40);
  border-radius: 50%;
  height: 12px;
  left: 8px;
  right: unset;
  top: 8px;
  width: 12px;

  &:before {
    background-color: transparent;
    content: " ";
    display: block;
    height: 12px;
    width: 12px;

    @include svg-mask(
      '<path d="m16.192 6.344-4.243 4.242-4.242-4.242-1.414 1.414L10.535 12l-4.242 4.242 1.414 1.414 4.242-4.242 4.243 4.242 1.414-1.414L13.364 12l4.242-4.242z"></path>',
      "0 0 24 24"
    );
  }

  &:hover:before {
    background-color: var(--shade-80);
  }
}

.modal-title {
  font-weight: var(--medium-weight);
  font-size: 13px;
  line-height: 1.2;
  padding: 6px 28px;
  border-bottom: 1px solid var(--shade-5);

  &:empty {
    display: none;
  }

  .modal-content & {
    width: 100%;
    border-bottom: none;
  }

  .is-mobile & {
    font-weight: var(--medium-weight);
    font-size: 1rem;
  }
}

.modal-content {
  height: 100%;
  margin: 0;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2em;

  > * {
    width: 100%;
  }

  .modal-container.mod-confirmation & {
    justify-content: center;
    padding: 0 1.5em;
  }

  .modal.mod-settings & {
    padding: 0;
  }
}

.modal-container.mod-confirmation {
  .input-label {
    display: none;
  }

  input {
    width: 100%;
  }
}

.modal-button-container {
  margin: 0;
  display: flex;
  text-align: unset;
  justify-content: flex-end;
  padding: 0 1.5em;
}

.vertical-tabs-container {
  width: 100%;
  background-color: var(--background-secondary);
}

.horizontal-tab-content,
.vertical-tab-content {
  background-color: var(--background-primary);
  padding: 1.5rem;
}

.vertical-tab-header-group {
  padding: 0 0 1.5rem;
}

.vertical-tab-header-group-title {
  color: var(--shade-40);
  font-size: 13px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  padding: 0 18px 6px;
}

.vertical-tab-header-group-items {
  padding: 0 10px;
}

.vertical-tab-nav-item.is-active {
  color: var(--text-normal);
  background: var(--shade-plus-darker);
}

.vertical-tab-nav-item {
  font-size: var(--ui-font-size);
  padding: 5px 8px;
  color: var(--text-normal);
  border: none;
  background: transparent;
  font-weight: var(--medium-weight);
  border-radius: var(--radius-s);
  line-height: 1.4;
}

.horizontal-tab-nav-item:hover,
.vertical-tab-nav-item:hover {
  &:not(.is-active) {
    background-color: transparent;
  }
}
